<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ include file="../../base.jsp"%>
<!DOCTYPE html>
<html>

<head>
    <!-- 页面meta -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>数据 - AdminLTE2定制版</title>
    <meta name="description" content="AdminLTE2定制版">
    <meta name="keywords" content="AdminLTE2定制版">
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport">
</head>
<%--
<script>
    function save() {
        var id = getCheckId()
        if(id) {
            location.href="${ctx}/cargo/invoice/edit.do?id="+id;
        }else{
            alert("请勾选待处理的记录，且每次只能勾选一个")
        }
    }
</script>--%>
<body>
<div id="frameContent" class="content-wrapper" style="margin-left:0px;">
    <!-- 内容头部 -->
    <section class="content-header">
        <h1>
            货运管理
            <small>新增发票</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="all-admin-index.html"><i class="fa fa-dashboard"></i> 首页</a></li>
            <li><a href="all-order-manage-list.html">货运管理</a></li>
            <li class="active">新增发票</li>
        </ol>
    </section>
    <!-- 内容头部 /-->
    <form id="editForm" action="${ctx}/cargo/invoice/edit.do" method="post">
        <!-- 正文区域 -->
        <section class="content">
            <div class="panel panel-default">
                <div class="panel-heading">发票信息</div>

                <div class="row data-type" style="margin: 0px">
                    <div class="col-md-2 title">提单编号</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="提单编号" name="blNo" />
                    </div>

                    <div class="col-md-2 title">邮政信箱</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="邮政信箱" name="pobox"/>
                    </div>

                </div>

            </div>
            <!-- .box-body -->
            <div class="box box-primary">
                <div class="box-header with-border">
                    <h3 class="box-title">委托列表</h3>
                </div>

                <div class="box-body">

                    <!-- 数据表格 -->
                    <div class="table-box">
                        <!--数据列表-->
                        <table class="table table-bordered table-striped table-hover dataTable" id="mRecordTable">

                            <thead>
                                <tr class="rowTitle" align="middle">
                                    <td width="20px"></td>
                                <td width="90px">运输方式</td>
                                <td width="60px">货主</td>
                                <td width="90px">提交抬头</td>
                                <td width="90px">正本通知人</td>
                                <td width="90px">信用证</td>
                                <td width="90px">装运港</td>
                                <td width="90px">卸货港</td>
                                <td width="90px">转船日期</td>
                                <td width="90px">运输要求</td>
                                <td width="90px">状态</td>
                            </tr>
                            </thead>
                            <c:forEach items="${shippings}" var="o" varStatus="status">
                                <tr class="odd" onmouseover="this.className='highlight'" onmouseout="this.className='odd'" >
                                    <%--<input type="hidden" name="id" value="${o.id}"/>--%>
                                    <td><input type="radio" name="id" value="${o.id}"/></td>
                                    <td>
                                        <c:if test="${o.orderType=='SEA'}">海运</c:if>
                                        <c:if test="${o.orderType=='AIR'}">空运</c:if>
                                    </td>
                                    <td>${o.shipper}</td>
                                    <td>${o.consignee}</td>
                                    <td>${o.notifyParty}</td>
                                    <td>${o.lcNo}</td>
                                    <td>${o.portOfLoading}</td>
                                    <td>${o.portOfDischarge}</td>
                                    <td><fmt:formatDate value="${o.loadingDate}" pattern="yyyy-MM-dd"/></td>
                                    <td>${o.specialCondition}</td>
                                    <td>
                                        <c:if test="${o.state==0}">草稿</c:if>
                                        <c:if test="${o.state==1}"><font color="green">已委托</font></c:if>
                                    </td>
                                </tr>
                            </c:forEach>
                        </table>
                        <!--数据列表/-->
                        <!--工具栏/-->
                    </div>
                    <!-- 数据表格 /-->
                </div>
                <!-- /.box-body -->

            </div>

            <!--工具栏-->
            <div class="box-tools text-center">
                <button type="submit"  class="btn bg-maroon">保存</button>
                <button type="button" class="btn bg-default" onclick="history.back(-1);">返回</button>
            </div>
            <!--工具栏/-->
        </section>
    </form>
</div>
<!-- 内容区域 /-->
</body>
<script src="../../plugins/datepicker/bootstrap-datepicker.js"></script>
<script src="../../plugins/datepicker/locales/bootstrap-datepicker.zh-CN.js"></script>
<link rel="stylesheet" href="../../css/style.css">
<script>
</script>
</html>